import request from '@/utils/request'

export function queryScoreDistribution() {
  return request({
    url: '/teaching/examrecord/score/distribution',
    method: 'get'
  })
}
export function queryScoreTrend() {
  return request({
    url: '/teaching/examrecord/score/trend',
    method: 'get'
  })
}
export function queryLastWeek(form) {
  return request({
    url: '/teaching/examrecord/week/last',
    method: 'get',
    params:{
      stage: form.stage,
      classesId: form.classesId
    }
  })
}
export function listExamdetails(classesId) {
  return request({
    url: '/teaching/examrecord/detail/list/'+classesId,
    method: 'get'
  })
}
// 查询学生成绩记录列表
export function listExamrecord(query) {
  return request({
    url: '/teaching/examrecord/list',
    method: 'get',
    params: query
  })
}

// 查询学生成绩记录详细
export function getExamrecord(id) {
  return request({
    url: '/teaching/examrecord/' + id,
    method: 'get'
  })
}

// 新增学生成绩记录
export function addExamrecord(data) {
  return request({
    url: '/teaching/examrecord',
    method: 'post',
    data: data
  })
}

// 修改学生成绩记录
export function updateExamrecord(data) {
  return request({
    url: '/teaching/examrecord',
    method: 'put',
    data: data
  })
}

// 删除学生成绩记录
export function delExamrecord(id) {
  return request({
    url: '/teaching/examrecord/' + id,
    method: 'delete'
  })
}
